#include "status.h"
#include <stdio.h>
#include <stdlib.h>
#define maxsize 20
#define maxweight 99999
typedef struct{
	datatype r[maxsize+1];
	int length;
}seqlist;

typedef struct{
	seqlist vertices;
	int edge[maxsize+1][maxsize+1];
	int numofedges;
}adjmgraph;
void listinit(seqlist *list){
	for(int i=0;i<=maxsize;i++)
		list->r[i]=0;
	list->length=0;
}
void listinsert(seqlist *list,datatype x){
	list->r[list->length+1]=x;
	list->length++;
}
void init(adjmgraph *g,int n){
	int i,j;
	for(i=0;i<=n;i++){
		for(j=0;j<=n;j++){
			if(i==j)g->edge[i][j]=0;
			else g->edge[i][j]=maxweight;
		}
	}
	g->numofedges=0;
	listinit(&g->vertices);
}
void insertvertex(adjmgraph *g,datatype v){
	listinsert(&g->vertices,v);
}
void insertedge(adjmgraph *g,int v1,int v2,int weight){
	if(v1>g->vertices.length || v2>g->vertices.length)return;
	adjmgraph->edge[v1][v2]=weight;
	adjmgrph->numofedges++;
}
void deledge(adjmgraph *g,int v1,int v2){
	g->edge[v1][v2]=maxweight;
	g->numofedges--;
}
int first(adjmgraph *g,int v){
	for(int col=1;col<=g->vertices.length;col++)
		if()
}
